snippet     if
abbr        if endif
prev_word   '^'
    if ${1:condition}
        ${0}
    endif

snippet elseif
prev_word   '^'
    else if ${1:/* condition */}
        ${0}

snippet     ifelse
abbr        if else endif
prev_word   '^'
    if ${1:condition}
        ${2}
    else
        ${3}  
    endif

snippet     for
abbr        for in endfor
prev_word   '^'
    for ${1:var} in ${2:list}
        ${0}
    endfor

snippet     while
abbr        while endwhile
prev_word   '^'
    while ${1:condition}
        ${0}
    endwhile

snippet     function
abbr        func endfunc
alias       func
prev_word   '^'
    function! ${1:func_name}(${2})
        ${0}
    endfunction

snippet     try
abbr        try endtry
prev_word   '^'
    try
        ${1}
    catch /${2:pattern}/
        ${3}
    endtry

snippet     log
prev_word   '^'
    echomsg string(${1})

